// 系统
import request from '@/utils/request'
const sysApi = {
  rolePage(params) {
    return request({
      url: '/system/role/page',
      method: 'get',
      params
    })
  },
  sysRole(data) {
    return request({
      url: `/system/role/${data}`,
      method: 'delete',
      data
    })
  },
  sysMenu() {
    return request({
      url: '/system/menu/tree',
      method: 'get'
    })
  },
  sysRoleInfo(id) {
    return request({
      url: '/system/role/info/' + id,
      method: 'get'
    })
  },
  sysRoleSubmit(data) {
    return request({
      url: '/system/role',
      method: data.method,
      data: data.data
    })
  },
  sysUserPage(params) {
    return request({
      url: '/system/user/page',
      method: 'get',
      params
    })
  },
  sysUser(ids) {
    return request({
      url: `/system/user/${ids}`,
      method: 'delete',
      data: ids
    })
  },
  sysUserSubmit(data) {
    return request({
      url: '/system/user',
      method: data.method,
      data: data.data
    })
  },
  sysRoleList() {
    return request({
      url: '/system/role/list',
      method: 'get'
    })
  },
  sysUserInfo(id) {
    return request({
      url: `/system/user/info/${id}`,
      method: 'get'
    })
  }

}
export default sysApi
